home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / DIB.ZIP / DIB.DOC < prev    next >
Text File  |  1991-12-09  |  2KB  |  57 lines

  1.  
  2.           Turbo Pascal for Windows Example BitBlt / DIB Programs
  3.           ------------------------------------------------------
  4.  
  5. These programs are examples of manipulating device independant bitmaps (DIBs)
  6. in TPW.  The first (Blit4) is based on LOADBMP in chapter 8 of Tom Swan's
  7. "Turbo Pascal for Windows 3.0 Programming", Blit8 and DIB8 are 256-color
  8. extensions of the example.
  9.  
  10. Hopefully, these will provide an simple example of 256-color bitmap code
  11. using TPW.  If anyone has any comments to offer on the way things are done,
  12. please let me know: I'm just learning this stuff and these are my first cuts
  13. at this!
  14.  
  15.  
  16. Program           Purpose
  17. ---------         -----------
  18. Blit4             BitBlit example for 4 bit / pixel (16-color) bitmaps
  19. Blit8             BitBlit example for 8 bit / pixel (256-color) bitmaps
  20. DIB8              SetDIBits example for 8 bit / pixel bitmaps
  21.  
  22. Blit8 and DIB8 do the same thing in two different ways.  DIB8 takes up less
  23. room since GDI dosen't also have a copy of the bitmap in memory.
  24.  
  25.  
  26. Operation
  27. ---------
  28.  
  29. Click the left mouse button to increase the enlargement factor by 1/2.
  30. Click the right mouse button to decrease it by 1/2.
  31.  
  32.  
  33. Sources
  34. -------
  35.  
  36. The code for processing DIBs is derived from Charles Petzold's PC Magazine
  37. "Environments" articles on DIBs (28 May 91 through 24 Sep 91) and his
  38. articles on palette manipulation (26 Feb 91 through 30 April 91).
  39.  
  40. The Calc_DIB_Data procedure is based on CP's DIBDataAddress function.
  41.  
  42.  
  43. Known Problems
  44. --------------
  45.  
  46. For some reason, the Blit8 program's StretchBlit dosen't work for Factors
  47. that aren't whole numbers.
  48.  
  49. Blit8 and DIB8 haven't been tested with OS/2 1.x-style DIBs.
  50.  
  51. I've no idea whether the DIB and palette initialization would be better
  52. done in Init or SetupWindow.  For Blit8 I need a valid HWindow, so I think
  53. that one (at least) needs SetupWindow.
  54.  
  55.  
  56. Ralph Smith, clySmic software [76156,164] or [76376,3150]
  57.